export function useStorage() {
  const setItem = (key: string, data: any) => {
    uni.setStorageSync(key, JSON.stringify(data));
  };

  const getItem = (key: string) => {
    const data = uni.getStorageSync(key);
    return data ? JSON.parse(data) : null;
  };

  return { setItem, getItem };
}
